package StudyCode.summary.mycollection;

import java.util.Iterator;
import java.util.Set;
import java.util.TreeMap;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class GetSetViewOfKeysFromTreeMap {
	public static void main(String[] args) {
		TreeMap treeMap = new TreeMap();

		treeMap.put("1", "One");
		treeMap.put("3", "Three");
		treeMap.put("2", "Two");

		Set st = treeMap.keySet();

		System.out.println("TreeMap Keys 包含 :");

		Iterator itr = st.iterator();
		while (itr.hasNext())
			System.out.println(itr.next());

	}
}
